﻿using Autofac.Core;
using System.Reflection;
using WebAPI测试程序.Attr;

namespace WebAPI测试程序.Selector
{
    public class AutowirePropertySelector : IPropertySelector
    {
        public bool InjectProperty(PropertyInfo propertyInfo, object instance)
        {
            return propertyInfo.CustomAttributes.Any(t => t.AttributeType == typeof(AutowireAttribute));
        }
    }
}
